package com.haizhi;

import com.haizhi.exit.KillHandler;
import com.haizhi.task.Scheduler;
import com.haizhi.util.PropertyUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author youfeng
 * @date 2018/3/28
 * 数据收集总入口
 */
public class Server {

    private static final Logger logger = LogManager.getLogger(Server.class);

    static {
        PropertyUtil.loadProperties("application.properties");
    }

    public static void main(String... args) {
        try {

            Scheduler scheduler = new Scheduler();
            KillHandler killHandler = new KillHandler(scheduler);
            scheduler.start();
        } catch (Exception e) {
            logger.error("程序异常:", e);
        }
    }
}